package com.qf.pojo;
//订单项
public class OrderItem {

    /*
    *
FieldTypeComment
itemidvarchar(32) NOT NULL
countint(11) NULL
subtotaldouble NULL
pidvarchar(32) NULL
oidvarchar(32) NULL
    * */
    private String itemid;//订单项的id
    private Integer count;//订单项包含的商品数量
    private  Double subtotal;//每一个订单项的商品小计
    private  Product product;//订单项中的商品实体
    private Order order;//订单项属于哪一个订单

    public String getItemid() {
        return itemid;
    }

    public void setItemid(String itemid) {
        this.itemid = itemid;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getSubtotal() {
        return this.count * product.getShop_price();
    }

    public void setSubtotal(Double subtotal) {
        this.subtotal = subtotal;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }
}
